from docx import Document

# doc = Document()
# doc.add_heading("文档标题", level=0)
# doc.add_paragraph("这是一个段落")
# doc.add_paragraph("这是一个加粗的段落", style="Heading 2")
#
# doc.save("demo.docx")

doc = Document("demo.docx")
for para in doc.paragraphs:
    print(para.text)
